package com.unicom.mec.market.service;

import com.unicom.mec.market.mapper.ApplicationMapper;
import com.unicom.mec.market.mapper.DeployTemplateMapper;
import com.unicom.mec.market.vo.ApplicationVo;
import com.unicom.mec.market.vo.TemplateVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 边缘市场业务层实现
 *
 * @author 刘亮武
 * @date 2020年06月15日
 */
@Service
public class MarketServiceImpl implements MarketService {

    @Autowired
    private ApplicationMapper applicationMapper;
    @Autowired
    private DeployTemplateMapper deployTemplateMapper;

    @Override
    public List<ApplicationVo> findApplications(String industry, String type, String arch, Integer applicationType, Integer applicationPermission, Long tenantId) {
        return applicationMapper.findApplications(industry,type,arch,applicationType,applicationPermission,tenantId);
    }

    @Override
    public ApplicationVo findApplicationById(Long applicationId) {
        return applicationMapper.findApplicationById(applicationId);
    }

    @Override
    public List<TemplateVo> findApplicationTemplates(Long applicationId) {
        return deployTemplateMapper.findApplicationTemplates(applicationId);
    }
}
